package com.user.mediacoderdemo;


/**
 * Created by zoudong on 2017/2/7.
 */

public class FormatTimeKit {

    public  static String getTime(long duration) {
        int min = (int) ((duration / 1000) / 60);
        int sec = (int) ((duration / 1000) % 60);
        return getType(min) + ":" + getType(sec);
    }

    private static  String getType(int time) {
        return time<10 ? "0" + time : String.valueOf(time);
    }
}
